Add packetizer cocotb regression coverage#1425
Draft
bengineerd wants to merge 14 commits into
Draft
Conversation
- Introduced tests for reset behavior in FIFO and RAM modules, ensuring proper handling of pending entries and state clearing. - Added tests for simultaneous read/write operations in FIFO and RAM, verifying correct data handling during collisions and near-full conditions. - Implemented tests for starvation resistance in arbiters, ensuring fair request handling under contention. - Enhanced watchdog tests to cover chattered keepalive sequences, ensuring timeout behavior is correctly implemented. - Added cross-port collision tests in dual-port RAM, verifying correct data visibility and handling during simultaneous writes. - Introduced burst read gap tests in synchronizer FIFO, ensuring proper data transfer during paused reads and reset conditions.
…VHDL description header: maxCount is intended to be programmed during init or reset. If changed at runtime, assert rst afterward. Discard output history for at least one newly configured delay interval before relying on dout. Added a fuller module description covering RAM mode, address wrapping, en, DO_REG_G, and delay formula. Also aligned test_SlvDelayRam.py with that contract: it now reprograms maxCount, resets, discards the post-reset history interval, then verifies stable traffic at the new delay.
- Introduced `AxiStreamDepacketizer2Wrapper.vhd` to provide a Cocotb-facing interface for the `surf.AxiStreamDepacketizer2` entity. - Introduced `AxiStreamPacketizer2Wrapper.vhd` to provide a Cocotb-facing interface for the `surf.AxiStreamPacketizer2` entity. - Created test utilities in `packetizer_test_utils.py` to facilitate testing of AXI Stream interfaces. - Implemented tests for the `AxiStreamDepacketizer2` in `test_AxiStreamDepacketizer2.py` to validate packet processing and output correctness. - Implemented tests for the `AxiStreamPacketizer2` in `test_AxiStreamPacketizer2.py` to ensure proper packetization of input streams. - Added an `__init__.py` file to the `tests/protocols/packetizer` directory for package initialization.
… handling - Updated AxiStreamBytePackerWrapper to support configurable slave and master byte widths. - Adjusted input and output signal definitions to reflect new byte-width parameters. - Added assertions to ensure master byte width is not less than slave byte width. - Modified test_AxiStreamBytePacker to accommodate various input/output byte-width pairs. - Introduced new tests for edge cases, including idle gaps and output ready signal handling. - Enhanced test coverage for AxiStreamDepacketizer and AxiStreamPacketizer to validate new functionality. - Added tests for split sequences, partial last beats, and interleaved destination states.
- Implemented AxiStreamPacketizer2LoopbackWrapper in VHDL to facilitate loopback testing between packetizer and depacketizer. - Enhanced packetizer and depacketizer test utilities with backpressure handling. - Added tests for packetizer and depacketizer to validate behavior under various conditions, including CRC modes and backpressure scenarios. - Introduced a new test for the loopback wrapper to ensure proper handling of split frames and backpressure. - Updated existing tests to improve coverage and ensure compliance with new functionality.
- Implemented `test_AxiStreamDepacketizer2Crc.py` to validate CRC error handling in the AxiStream depacketizer. - Created `test_AxiStreamDepacketizer2LinkDrop.py` to check link drop behavior during frame processing. - Enhanced `test_AxiStreamPacketizer.py` to utilize new assertion functions for packetized beats. - Updated `test_AxiStreamPacketizer2.py` to include tests for packetization with sequence counter wrapping. - Introduced `test_AxiStreamPacketizer2Loopback.py` to validate loopback functionality with various destination settings. - Added `test_AxiStreamPacketizer2SeqWrap.py` to verify sequence counter wrapping behavior in packetization.
This was referenced May 28, 2026
77c2348 to
eb616cb
Compare
Comment on lines
+20
to
+29
| rxErrorCodeEnum = { | ||
| 0x0: 'None', | ||
| 0x1: 'BadControl', | ||
| 0x2: 'Overwrite', | ||
| 0x3: 'IdleError', | ||
| 0x4: 'PayloadAbort', | ||
| 0x5: 'SeqMismatch', | ||
| 0x6: 'HkpMalformed', | ||
| 0x7: 'HkpBadKCode', | ||
| } |
Comment on lines
+11
to
+14
| # Test methodology: | ||
| # - Sweep: Use the standalone `AxiStreamPacketizer2` wrapper in CRC-disabled | ||
| # mode with an 8-byte stream width and a reduced packet-size limit for the | ||
| # split-frame case. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds focused cocotb regression coverage for the AXI Stream packetizer family, including byte packing, packetizer/depacketizer, packetizer2/depacketizer2, CRC/error handling, link-drop behavior, loopback behavior, and sequence wrap handling.
Details
This packetizer-focused slice adds thin VHDL wrappers under
protocols/packetizer/wrappers/so cocotb can drive and observe the existing RTL through flattened AXI Stream ports without embedding stimulus in VHDL. The wrappers cover:AxiStreamBytePackerAxiStreamPacketizerandAxiStreamDepacketizerAxiStreamPacketizer2andAxiStreamDepacketizer2The new Python regression support under
tests/protocols/packetizer/adds shared packetizer helpers and directed tests for:The branch also adds/updates regression planning notes for the packetizer work under
docs/plans/rtl-regression/.Merge after #1414.